<ion-content>
  <div *ngIf="flag" class="contain">
    <ion-list>
      <ion-card *ngFor="let item of orderlist, let i = index">
        <ion-item>
          <ion-avatar item-start>
            <img src="{{picrooturl}}{{item.shop_logo}}">
          </ion-avatar>
          <h2 class="tou">
            <span class="avatar-detail gray" *ngIf="item.order_status == -4">已过期</span>
            <span class="avatar-detail" *ngIf="item.order_status == -3">审核中</span>
            <span class="avatar-detail" *ngIf="item.order_status == -2">退款成功</span>
            <span class="avatar-detail" *ngIf="item.order_status == -1">订单取消</span>
            <span class="avatar-detail gray" *ngIf="item.order_status == 0">支付失败</span>
            <span class="avatar-detail" *ngIf="item.order_status == 1">未支付</span>
            <span class="avatar-detail" *ngIf="item.order_status == 2">未使用</span>
            <span class="avatar-detail" *ngIf="item.order_status == 3">交易成功</span>
            <span class="avatar-detail" *ngIf="item.order_status == 4">交易成功</span>
            <span class="shopName">{{item.shop_name}}</span>
          </h2>
        </ion-item>
        <ion-grid>
          <ion-row>
            <ion-col col-4 id="goods">
              <img src={{picrooturl}}{{item.service_info.imgs}} class="goodPic">
            </ion-col>
            <ion-col col-5 class="mydetail">
              <h4 class="serviceName">{{item.service_info.service_name}}</h4>
              <p class="orderCount">数量X{{item.order_count}}</p>
              <p class="marketPrice">￥{{item.service_info.market_price}}</p>
            </ion-col>
            <ion-col col-3 class="price">
              <p class="service">服务</p>
              <p class="servicePrice">￥{{item.service_info.service_price}}</p>
            </ion-col>
          </ion-row>
          <ion-row class="shopInfo">
            <ion-col col-9>
              <img src="assets/img/Comment/dingwei@2x.png" alt="" class="shopLogo">
              <span class="shopLength">{{item.shop_address}}</span>
            </ion-col>
            <ion-col col-3 class="phoneCall">
              <div class="border">
                <!--<a href="tel://{{detail.shop_tel}}" >
                    <img style="height:98%" src="assets/img/call.png" alt="">
                </a>-->
                <a href="tel:{{item.shop_tel}}">
                  <img src="assets/img/Comment/call@2x.png" alt="" class="shopPhone">
                </a>
              </div>
            </ion-col>
          </ion-row>
          <ion-row>
            <ion-col class="noPadding" *ngIf="item.order_status != -3">
              <button class="refund" *ngIf="item.order_status==2" (tap)="refund(item)">退款</button>
              <button class="checkQ four" *ngIf="item.order_status==2" (tap)="seeTicket(item)">查看券码</button>
              <!-- <button class="checkQ" *ngIf="item.order_status==1" (tap)="gotopay(item)">去支付</button> -->
              <button class="checkQ" *ngIf="item.order_status==3" (tap)="comment(item)">评价</button>
              <button class="checkD" *ngIf="item.order_status == -2" (tap)="deletOrder(item)">
                删除订单{{fromFatherValue}}
              </button>
            </ion-col>
          </ion-row>
        </ion-grid>
      </ion-card>
    </ion-list>
    <div *ngIf="bottom1" text-center class="bot">已经加载全部啦 ~</div>
    <ion-infinite-scroll (ionInfinite)="doInfinite($event)" threshold="100px">
      <ion-infinite-scroll-content loadingText="加载中..."></ion-infinite-scroll-content>
    </ion-infinite-scroll>



  </div>
  <span class="blank" *ngIf="!flag">
    <img src="assets/img/Comment/dingdankong@2x.png" alt="">
    <span>您还没有相关订单哟</span>
  </span>
</ion-content>